module AboutHelper

  def job_link_for(index, &block)
    cls = index_for(index)
    content_tag :li, class: cls do
      block.call
    end
  end

  def job_tab_pane_for(index, &block)
    cls = index_for(index)
    content_tag :div, class: "tab-pane #{cls}", id: "job-#{index}"  do
      block.call
    end
  end

  private

  def index_for(index)
    index == 0 ? 'active' :  ''
  end
end
